package service.Impl;

import dao.StudentDao;
import entity.Student;
import org.springframework.stereotype.Service;
import service.StudentService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
//引用类型的自动注入
    @Resource
    private StudentDao studentDao;

    @Override
    public int addStudent(Student student) {
        return studentDao.insertStudent(student);
    }

    @Override
    public List<Student> queryStudent() {
        return studentDao.selectStudent();
    }

    @Override
    public int reStudent(Student student) {
        return studentDao.updateStudent(student);
    }

    @Override
    public int delStudent(Student student) {
        return studentDao.deleteStudent(student);
    }


}
